* This is the master file for running the code necessary to replicate all figures and tables in ‘Private Monopoly and Restricted Entry – Evidence from the Notary Profession,’ by Verboven and Yontcheva.

//global main_directory "PATH_TO_REPLICATION_FILES"
cd $main_directory

//European analysis
do 01_European_analysis.do
//Descriptive statistics Belgian analysis
do 02_01_descriptive_statistics.do
//Preparation of the dataset used for demand estimation
do 02_02_generation_demand_dataset.do
//Information on family ties in Belgium
do 02_03_notaries_with_family_ties.do
//Execution of the demand estimation
do 03_01_spatial_demand_Q.do
do 03_02_spatial_demand_Q1.do
do 03_03_spatial_demand_Q2.do
//Estimation of the cost parameters
do 04_cost_price_parameters.do
//Changes in output and consumer surplus due to addition and removal of notaries
do 05_01_addition_of_notaries.do
do 05_02_removal_of_notaries.do
//Lambda bounds based on switches
do 06_01_lambda_switches_loop.do
//Demand expansion and fixed cost bounds
do 06_03_demand_expansion_and_fixed_cost_parameters.do
//Price reduction counterfactual
do 07_01_price_reduction_loop.do
//Preparation of the dataset used for counterfactuals based on post offices
do 08_data_preparation_post_office.do 
//Welfare maximization counterfactual
do 09_01_grid_welfare_maximization.do
do 09_02_welfare_maximization_counterfactual.do
//Free entry counterfactual
do 10_01_grid_free_entry.do
do 10_02_free_entry_counterfactual.do
//Robustness checks with different transportation costs
do 11_01_appendix_transportation_cost_matrices.do
do 11_02_addition_of_notaries_75.do
do 11_03_removal_of_notaries_75.do
do 11_04_addition_of_notaries_125.do
do 11_05_removal_of_notaries_125.do
do 11_06_demand_expansion_and_fixed_cost_parameters_75.do
do 11_07_demand_expansion_and_fixed_cost_parameters_125.do
//Figures in the Appendix
do 12_01_firm_locations_map.do
do 12_02_relative_change_in_notaries_map.do
